package com.iwhalecloud.citybrain.flow.platform.http;

import com.iwhalecloud.citybrain.flow.platform.api.FlowClientService;
import com.iwhalecloud.citybrain.flow.platform.api.in.*;
import com.iwhalecloud.citybrain.flow.platform.api.out.*;
import com.iwhalecloud.citybrain.flow.platform.manager.common.ResponseResult;
import com.iwhalecloud.citybrain.flow.platform.api.out.TaskCandidateResultDto;
import com.iwhalecloud.citybrain.flow.platform.manager.common.client.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.text.ParseException;
import java.util.List;

/**
 * @author lilh
 * @date 2020/10/29 17:11
 */
@FeignClient(value = "flow-platform", path = "/flow-platform")
public interface FlowClientHttpService extends FlowClientService {

    @Override
    @PostMapping("/api/v1.0/public/processInstance")
    @ApiOperation(value = "获取流程基本信息")
    ResponseResult processInstance(@RequestBody HttpCommandDto httpCommandDto);

    @Override
    @GetMapping("/api/v1.0/public/getStartForm")
    @ApiOperation(value = "获取启动表单schema")
    ResponseResult getStartForm(@RequestParam("modelKey") String modelKey);

    @Override
    @GetMapping("/api/v1.0/public/getStartFormWithData")
    @ApiOperation(value = "获取启动表单schema + 表单数据")
    ResponseResult getStartFormWithData(@RequestParam("processInstanceId") String processInstanceId);

    @Override
    @GetMapping("/api/v1.0/public/getTaskForm")
    @ApiOperation(value = "获取任务关联的表单schema")
    ResponseResult getTaskForm(@RequestParam("taskId") String taskId);

    @Override
    @GetMapping("/api/v1.0/public/getTaskFormWithData")
    @ApiOperation(value = "获取任务关联的表单schema + 表单数据")
    ResponseResult getTaskFormDataByTaskId(@RequestParam("taskId") String taskId);

    @Override
    @PostMapping("/api/v1.0/public/getFieldLimitList")
    @ApiOperation(value = "获取流程字段限制")
    ResponseResult<List<FlowFieldLimitDTO>> getFormFieldLimitList(@RequestBody FlowFieldLimitQueryVo flowFieldLimitQueryVo);

    @Override
    @GetMapping("/api/v1.0/public/getTaskFormWithDataByTaskNodeCode")
    @ApiOperation(value = "根据实例id和任务节点编码获取任务关联的表单schema + 表单数据")
    ResponseResult getTaskFormWithData(@RequestParam("processInstanceId") String processInstanceId, @RequestParam("taskNodeCode") String taskNodeCode);

    @Override
    @PostMapping("/api/v1.0/public/applyProcess")
    @ApiOperation(value = "发起申请")
    ResponseResult applyProcess(@RequestBody HttpApplyProcessDto applyProcessDto);

    @Override
    @PostMapping("/api/v1.0/public/createProcessInstance")
    @ApiOperation(value = "创建流程实例")
    ResponseResult createProcessInstance(@RequestBody HttpCreateProcessInstanceDto createProcessInstanceDto);

    @Override
    @PostMapping("/api/v1.0/public/startProcessInstance")
    @ApiOperation("启动流程实例")
    ResponseResult startProcessInstance(@RequestBody HttpStartProcessInstanceDto startProcessInstanceDto);

    @Override
    @GetMapping("/api/v1.0/public/task/getCurrentTaskIdByProcessInstanceId")
    @ApiOperation(value = "根据流程实例编号查询当前任务编号")
    ResponseResult<TaskDTO> getCurrentTaskIdByProcessInstanceId(@RequestParam("processInstanceId") String processInstanceId);

    @Override
    @PostMapping("/api/v1.0/public/completeWorkItem")
    @ApiOperation("完成工作项(办理任务)")
    ResponseResult completeWorkItem(@RequestBody HttpCompleteWorkItemDto completeWorkItemDto);

    @Override
    @PostMapping("/api/v1.0/public/terminateProcessInstance")
    @ApiOperation("终止流程")
    ResponseResult terminateProcessInstance(@RequestBody HttpTerminateProcessInstanceDto httpTerminateProcessInstanceDto);

    @Override
    @PostMapping("/api/v1.0/public/cancelProcessInstance")
    @ApiOperation("撤销流程（针对流程发起人）")
    ResponseResult cancelProcessInstance(@RequestBody HttpCancelProcessInstanceDto httpCancelProcessInstanceDto);

    @Override
    @PostMapping("/api/v1.0/public/dispatchWorkItem")
    @ApiOperation("转办工单")
    ResponseResult dispatchWorkItem(@RequestBody HttpDispatchWorkItemDto dispatchWorkItemDto);

    @Override
    @PostMapping("/api/v1.0/public/dispatchWorkItemNonUserCheck")
    @ApiOperation("转办工单，不校验处理人是否是当前任务的候选人")
    ResponseResult dispatchWorkItemNonUserCheck(@RequestBody HttpDispatchWorkItemDto dispatchWorkItemDto);


    /**
     * 委派或指派任务
     *
     * @param httpDelegateTaskDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/delegateTask")
    @ApiOperation("委派或指派任务")
    ResponseResult delegateTask(@RequestBody HttpDelegateTaskDto httpDelegateTaskDto);

    /**
     * 任务加签或多级加签
     *
     * @param httpAddSignTaskDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/addSignTask")
    @ApiOperation("任务加签或多级加签")
    ResponseResult addSignTask(@RequestBody HttpAddSignTaskDto httpAddSignTaskDto);

    /**
     * 任务减签
     *
     * @param httpDeleteSignTaskDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/deleteSignTask")
    @ApiOperation("任务减签")
    ResponseResult deleteSignTask(@RequestBody HttpDeleteSignTaskDto httpDeleteSignTaskDto);


    /**
     * 拿回
     *
     * @param taskTakeBackDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/takeBack")
    @ApiOperation("拿回")
    ResponseResult takeBack(@RequestBody HttpTaskTakeBackDto taskTakeBackDto);

    @Override
    @PostMapping("/api/v1.0/public/supplySignTask")
    @ApiOperation("补发，历史任务对当前会签任务进行加签操作")
    ResponseResult supplySignTask(@RequestBody HttpSupplySignTaskVo httpSupplySignTaskVo);

    /**
     * 回退当前任务到上一节点
     *
     * @param taskRollbackDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/rollbackToPreNode")
    @ApiOperation("回退到上一节点")
    ResponseResult rollbackToPreNode(@RequestBody HttpTaskRollbackDto taskRollbackDto);

    /**
     * 回退到第一个审批节点
     *
     * @param taskRollbackDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/rollbackToFirstNode")
    @ApiOperation("回退到第一个审批节点")
    ResponseResult rollbackToFirstNode(@RequestBody HttpTaskRollbackDto taskRollbackDto);

    /**
     * 回退到给定节点
     *
     * @param taskRollbackDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/rollbackToTargetNode")
    @ApiOperation("回退到给定节点")
    ResponseResult rollbackToTargetNode(@RequestBody HttpTaskRollbackDto taskRollbackDto);

    /**
     * 操作流程实例支持操作：暂停和激活
     *
     * @param httpProcessHandleDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/handleProcessInstanceByAction")
    @ApiOperation("操作流程实例(支持暂停(挂起)或激活(解挂)操作)")
    ResponseResult handleProcessInstanceByAction(@RequestBody HttpProcessHandleDto httpProcessHandleDto);

    /**
     * 判断是否必须表达意见
     *
     * @param taskApproveUrlQueryVo
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/MustExpress")
    @ApiOperation("判断是否必须表达意见")
    ResponseResult<MustExpressDTO> mustExpress(@RequestBody TaskApproveUrlQueryVo taskApproveUrlQueryVo);

    @Override
    @GetMapping("/api/v1.0/public/getTaskInst")
    @ApiOperation(value = "查看任务详情")
    ResponseResult getTaskInst(@RequestParam("taskId") String taskId, @RequestParam("userId") String userId);

    /**
     * 根据任务实例编号获取审批页面
     *
     * @param taskApproveUrlQueryVo
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/getTaskApproveUrl")
    @ApiOperation("获取任务审批Url")
    ResponseResult<TaskUrlDTO> getTaskApproveUrl(@RequestBody TaskApproveUrlQueryVo taskApproveUrlQueryVo);

    /**
     * 查询当前用户是否为当前任务的候选人
     * 如果只传taskId，则只返回task信息
     *
     * @param taskCandidateCheckVo
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/queryCandidateTask")
    @ApiOperation("查询当前用户是否为当前任务的候选人")
    ResponseResult<TaskCandidateResultDto> queryCandidateTask(@RequestBody TaskCandidateCheckVo taskCandidateCheckVo);

    @Override
    @PostMapping("/api/v1.0/public/listTask")
    @ApiOperation("待办/经办任务列表")
    ResponseResult listTask(@RequestBody HttpTaskListQueryDto taskListQueryDto);

    @Override
    @PostMapping("/api/v1.0/public/myApply")
    @ApiOperation("我的申请列表")
    ResponseResult listMyApply(@RequestBody HttpMyApplyQueryDto myApplyQueryDto);

    @Override
    @GetMapping("/api/v1.0/public/getFlowRecords")
    @ApiOperation(value = "获取流程流转记录")
    ResponseResult getFlowRecords(@RequestParam("processInstanceId") String processInstanceId);

    @Override
    @GetMapping("/api/v1.0/public/getModels")
    @ApiOperation(value = "获取流程列表")
    ResponseResult getModels(@RequestParam("appCode") String appCode);

    @Override
    @PostMapping("/api/v1.0/public/generateProcessDiagram")
    @ApiOperation(value = "生成流程图")
    ResponseResult<HttpProcessGraphResponseDto> generateProcessDiagram(@RequestBody HttpGetProcessGraphDto processGraphDto);

    @Override
    @PostMapping("/api/v1.0/public/generateProcessXml")
    @ApiOperation(value = "生成流程xml")
    ResponseResult<HttpProcessXmlResponseDto> generateProcessXml(@RequestBody HttpGetProcessXmlDto processXmlDto);

    @Override
    @GetMapping("/api/v1.0/public/getProcessInstanceDiagramAndInfo")
    @ApiOperation("绘制流程图以及流程信息")
    public ResponseResult getProcessInstanceDiagramAndInfo(@RequestParam("processInstanceId") String processInstanceId);

    @Override
    @GetMapping("/api/v1.0/public/drawInst")
    @ApiOperation(value = "生成流程图")
    void drawInst(@RequestParam("instanceId") String procInstId);

    @Override
    @PostMapping("/api/v1.0/public/selectYuezhiTaskList")
    @ApiOperation(value = "阅知列表  此任务实例被别人完成了")
    ResponseResult selectYuezhiTaskList(@RequestBody FlowTaskFinishedNoticeQueryDto flowTaskFinishedNoticeQueryDto);

    @Override
    @PostMapping("/api/v1.0/public/getReadDoList")
    @ApiOperation("获取对应处理人的阅办信息列表")
    ResponseResult getReadDoList(@RequestBody HttpProcessInstanceHandleRelDto processInstanceHandleRelDto);

    @Override
    @PostMapping("/api/v1.0/public/updateReadDoStatus")
    @ApiOperation("更新阅办状态")
    ResponseResult updateReadDoStatus(@RequestBody HttpProcessInstanceHandleRelDto processInstanceHandleRelDto);

    /**
     * 根据流程实例或任务实例以及人员id处理对应的阅办信息
     *
     * @param processInstanceHandleRelDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/dealReadDoData")
    @ApiOperation("根据流程实例或任务实例以及人员id处理对应的阅办信息")
    ResponseResult dealReadDoData(@RequestBody HttpProcessInstanceHandleRelDto processInstanceHandleRelDto);

    @Override
    @PostMapping("/api/v1.0/public/todoTaskupdateReadFlag")
    @ApiOperation(value = "更新待办任务已读状态")
    ResponseResult todoTaskupdateReadFlag(@RequestBody UpdateReadVo updateReadVo);

    /**
     * 根据任务实例Id和变量key，返回对应的value
     *
     * @param
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/getVarVal")
    @ApiOperation(value = "根据任务实例Id（或流程Id）和变量key，返回对应的value")
    public ResponseResult getVarVal(@RequestBody VarValRequestDto varValRequestDto);

    @Override
    @PostMapping("/api/v1.0/public/setTaskVariable")
    @ApiOperation("设置任务变量，如果该任务上无此变量，将会设置父执行的变量（注意该变量设置可能会影响全局变量，滥用该方法可能会造成流程扭转异常）")
    ResponseResult<TaskVariableSetResponseDto> setTaskVariable(@RequestBody TaskVariableSetRequestDto requestDto);


    @Override
    @PostMapping("/api/v1.0/public/setTaskVariables")
    @ApiOperation("批量设置任务变量，如果该任务上无此变量，将会设置父执行的变量（注意该变量设置可能会影响全局变量，滥用该方法可能会造成流程扭转异常）")
    ResponseResult<TaskVariablesSetResponseDto> setTaskVariables(@RequestBody TaskVariablesSetRequestDto requestDto);
    /**
     * 设置后续节点的处理人
     *
     * @param setNodeCandidateRequestDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/setAssigneeForNode")
    @ApiOperation("设置后续节点处理人，后续节点可以是多个，处理人类型支持用户、组织、角色、岗位、用户组")
    ResponseResult setAssigneeForNode(@RequestBody SetNodeCandidateRequestDto setNodeCandidateRequestDto);

    /**
     * 设置后续节点的候选人
     *
     * @param setNodeCandidateRequestDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/setCandidateUsersForNode")
    @ApiOperation("设置后续节点候选人，后续节点可以是多个，处理人类型支持用户、组织、角色、岗位、用户组")
    ResponseResult setCandidateUsersForNode(@RequestBody SetNodeCandidateRequestDto setNodeCandidateRequestDto);

    /**
     * 清除预先设置的后续节点的候选人
     *
     * @param cleanNodeCandidateRequestDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/cleanNodeCandidateUsers")
    @ApiOperation("清除预先设置的后续节点的候选人，后续节点可以是多个")
    ResponseResult cleanNodeCandidateUsers(@RequestBody CleanNodeCandidateRequestDto cleanNodeCandidateRequestDto);

    @Override
    @PostMapping("/api/v1.0/public/getManualSelectNextNode")
    @ApiOperation("人工选择后续节点，返回后续节点连接线上的参数")
    ResponseResult getManualSelectNextNode(@RequestBody HttpBaseTaskDto httpBaseTaskDto);

    @Override
    @ApiOperation(value = "根据taskId获取后续节点的处理人配置信息（仅只用于顺序流，不适用于网关往回指向的流程；遇网关时，根据路由条件流转）")
    @PostMapping("/api/v1.0/public/getSequentNodeCandidateConfig")
    ResponseResult getSequentNodeCandidateConfig(@RequestBody SequentNodeCandidateConfigRequestDto sequentNodeCandidateConfigRequestDto);

    /**
     * 根据任务ID获取一下节点处理人信息
     *
     * @param taskId
     * @return
     */
    @Override
    @GetMapping("/api/v1.0/public/getNextNodeHandlerTask")
    @ApiOperation(value = "根据任务ID获取下一节点处理人信息")
    ResponseResult getNextNodeHandlerTask(@RequestParam("taskId") String taskId);

    /**
     * 根据实例ID和节点编码获取节点候选人对象
     *
     * @param processInstanceId
     * @param nodeCode
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/getNodeCandidateInfoList")
    @ApiOperation(value = "根据实例ID和节点编码获取流程节点处理人信息列表")
    public ResponseResult getNodeCandidateInfoList(@RequestParam(value = "processInstanceId", required = true) String processInstanceId, @RequestParam(value = "nodeCode", required = true) String nodeCode);


    @Override
    @PostMapping("/api/v1.0/public/getLastCandidate")
    @ApiOperation(value = "获取上次设置的候选人")
    public ResponseResult getLastCandidate(@RequestParam(value = "taskId", required = true) String taskId, @RequestParam(value = "nodeCode", required = true) String nodeCode);

    @Override
    @PostMapping("/api/v1.0/public/getAllLastCandidate")
    @ApiOperation(value = "获取所有节点上次设置的候选人")
    public ResponseResult getAllLastCandidate(@RequestParam(value = "processInstanceId", required = true) String processInstanceId);

    @Override
    @PostMapping("/api/v1.0/public/getLastCandidateOrOperator")
    @ApiOperation(value = "获取指定节点最新设置的候选人或者最近审批人信息")
    public ResponseResult getLastCandidateOrOperator(@RequestParam(value = "processInstanceId", required = true) String processInstanceId, @RequestParam(value = "nodeCode", required = false) String nodeCode);

    @Override
    @PostMapping("/api/v1.0/public/saveFunctionConfig")
    @ApiOperation("保存自定义函数信息")
    ResponseResult saveFunctionConfig(@RequestBody HttpFunctionConfigDto functionConfigDto);


    @Override
    @PostMapping("/api/v1.0/public/deleteFunctionConfig")
    @ApiOperation("删除自定义函数信息")
    ResponseResult deleteFunctionConfig(@RequestBody String ids);

    @Override
    @PostMapping("/api/v1.0/public/getFunctionConfigByFunName")
    @ApiOperation("根据函数名称获取自定义函数配置列表")
    ResponseResult getFunctionConfigByFunName(@RequestBody HttpFunctionConfigDto functionConfigDto);

    @Override
    @PostMapping("/api/v1.0/public/queryObjectMeta")
    @ApiOperation("根据流程实例，流程编码，节点id或者对象类型编码，查询流程模型绑定的相关对象类型")
    ResponseResult<List<ObjectMetaDto>> queryObjectMeta(@RequestBody ObjectMetaQueryDto objectMetaQueryDto);

    @Override
    @PostMapping("/api/v1.0/public/bindObjectIdWithTask")
    @ApiOperation(value = "根据对象实例ID绑定一个实例Id或任务节点编码")
    ResponseResult bindObjectIdWithTask(@RequestBody ObjectProcessInstanceVo flowObjectProcessInstanceVo);

    @Override
    @PostMapping("/api/v1.0/public/getObjectProcessInstanceList")
    @ApiOperation(value = "根据对象实例ID获取关联流程实例集合列表")
    ResponseResult<List<ObjectProcessInstanceVo>> getObjectProcessInstanceList(@RequestBody ObjectProcessInstanceVo flowObjectProcessInstanceVo);


    @Override
    @PostMapping("/api/v1.0/public/selectEmployeeList")
    @ApiOperation(value = "查询员工信息")
    public ResponseResult selectEmployeeList(@RequestBody EmployeeQueryDto vo);

    @Override
    @PostMapping("/api/v1.0/public/getUserGroupList")
    @ApiOperation("根据用户组获取对应的用户信息列表")
    ResponseResult getUserGroupList();

    @Override
    @PostMapping("/api/v1.0/public/getAllPositionList")
    @ApiOperation("获取用户岗位列表")
    ResponseResult getAllPositionList();

    @Override
    @PostMapping("/api/v1.0/public/getUserRelationShipList")
    @ApiOperation("获取用户关系列表")
    ResponseResult getUserRelationShipList();

    /**
     * 根据类型编码获取当前编码下得人员列表信息
     *
     * @param httpCandidateDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/getChildCandidate")
    @ApiOperation(value = "根据类型和编码获取当前编码下得人员列表信息或其它类型信息")
    public ResponseResult getChildCandidate(@RequestBody HttpCandidateDto httpCandidateDto);

    /**
     * 根据角色名称分页查询角色列表
     *
     * @param groupPageRequestDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/getUserRolePageList")
    @ApiOperation(value = "根据角色名称分页查询角色记录列表")
    public ResponseResult getUserRolePageList(@RequestBody UserRolePageRequestDto groupPageRequestDto);

    /**
     * 根据用户组名称查询用户组列表
     *
     * @param groupPageRequestDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/getUserGroupPageList")
    @ApiOperation(value = "根据用户组名称查询用户组记录列表")
    public ResponseResult getUserGroupPageList(@RequestBody UserGroupPageRequestDto groupPageRequestDto);

    /**
     * 根据岗位名称获取岗位数据列表
     *
     * @param positionListRequestDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/getUserPositionPageList")
    @ApiOperation(value = "根据岗位名称获取岗位记录列表")
    public ResponseResult getUserPositionPageList(@RequestBody UserPositionPageRequestDto positionListRequestDto);

    /**
     * 操作任务实例支持操作：暂停和激活
     *
     * @param httpProcessHandleDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/handleTaskByAction")
    @ApiOperation("操作任务实例(支持暂停(挂起)或激活(解挂)操作)")
    ResponseResult handleTaskByAction(@RequestBody HttpProcessHandleDto httpProcessHandleDto);

    /**
     * 根据流程实例编号查询当前任务或已完成的最后一个任务节点编号
     *
     * @param processInstanceId
     * @return
     */
    @Override
    @GetMapping("/api/v1.0/public/task/getCurrentOrDoneTaskIdByProcessInstanceId")
    @ApiOperation(value = "根据流程实例编号查询当前任务或已完成的最后一个任务节点编号")
    ResponseResult<TaskDTO> getCurrentOrDoneTaskIdByProcessInstanceId(@RequestParam("processInstanceId") String processInstanceId);

    @Override
    @PostMapping("/api/v1.0/public/batchQueryFlowRecords")
    @ApiOperation(value = "根据流程实例ID和节点编码批量查询审批信息")
    ResponseResult batchQueryFlowRecords(@RequestBody HttpFlowRecordsQueryDto httpFlowRecordsQueryDto);

    @Override
    @PostMapping("/api/v1.0/public/getTaskCodeList")
    @ApiOperation("根据多种条件查询获取任务节点列表")
    ResponseResult getTaskCodeList(@RequestBody HttpGetTaskDto httpGetTaskDto);


    @Override
    @PostMapping("/api/v1.0/public/updateTaskCompTime")
    @ApiOperation("更新待办中的【计划完成时间】")
    ResponseResult updateTaskCompTime(@RequestBody HttpUpdateCompTimeDto httpUpdateCompTimeDto);

    @Override
    @PostMapping("/api/v1.0/public/getRunningProcessList")
    @ApiOperation("查询指定当前在指定节点的流程集合")
    ResponseResult getRunningProcessList(@RequestBody HttpGetTaskDto httpGetTaskDto);


    @Override
    @GetMapping("/api/v1.0/public/getCurrentTaskInfoByProcessInstanceId")
    @ApiOperation("根据流程实例编号查询当前任务节点id及判断节点是否为第一个节点")
    ResponseResult getCurrentTaskInfoByProcessInstanceId(@RequestParam("processInstanceId") String processInstanceId);


    /**
     * 在流程实例中动态新增节点
     *
     * @param httpDynamicInjectTaskDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/dynamicInjectTask")
    @ApiOperation("在流程实例中动态新增节点")
    ResponseResult dynamicInjectTask(@RequestBody HttpDynamicInjectTaskDto httpDynamicInjectTaskDto);

    /**
     * 将流程实例迁移至流程最新版本
     *
     * @param httpMigrateProcessModelDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/migrateToNewVersion")
    @ApiOperation("将流程实例迁移至流程最新版本")
    ResponseResult migrateToNewVersion(@RequestBody HttpMigrateProcessModelDto httpMigrateProcessModelDto);


    @Override
    @PostMapping("/api/v1.0/public/getConfigEventsByModelKey")
    @ApiOperation("获取流程配置的事件")
    ResponseResult getConfigEvents(@RequestParam("modelKey") String modelKey);

    /**
     * 根据模型key查询待办任务信息
     * @param httpFlowQueryInfoDto
     * @return
     */
    @Override
    @PostMapping("/api/v1.0/public/getTodoTaskByModelKey")
    @ApiOperation(value = "根据模型key查询待办任务信息")
    ResponseResult getTodoTaskByModelKey(@RequestBody HttpFlowQueryInfoDto httpFlowQueryInfoDto);

    /**
     * 根据条件查询流程实例列表
     */
    @PostMapping("/api/v1.0/public/processInstanceList")
    @ApiOperation(value = "根据条件查询流程实例列表")
    ResponseResult list(@RequestBody HttpProcessInstanceQueryDto httpProcessInstanceQueryDto);

    /**
     * 根据流程编码获取当前运行的流程实例的modelId
     */
    @Override
    @PostMapping("/api/v1.0/public/getModelIdByModelKey")
    @ApiOperation(value = "根据流程编码获取当前运行的流程实例的modelId")
    ResponseResult getModelInfoByModelKey(@RequestParam("modelKey") String modelKey);

    @Override
    @PostMapping("/api/v1.0/public/getNextNodes")
    @ApiOperation("返回后续分支节点以及节点连接线上的参数")
    ResponseResult getNextNodes(@RequestBody HttpBaseTaskDto httpBaseTaskDto);

    @Override
    @PostMapping("/api/v1.0/public/batchInsertToTasksManager")
    @ApiOperation("批量同步待办任务至待办组件")
    ResponseResult batchInsertToTasksManager(@RequestBody HttpTaskManagerBatchDto httpTaskManagerBatchDto);

    @Override
    @GetMapping("/api/v1.0/public/getFlowStateByFlowId")
    @ApiOperation(value = "获取流程状态信息")
    ResponseResult getFlowStateByFlowId(@RequestParam("processInstanceId") String processInstanceId);

    @Override
    @PostMapping("/api/v1.0/public/updateNodeApprover")
    @ApiOperation(value = "修改流程节点审批人(运维工具)")
    ResponseResult updateNodeApprover(@RequestBody HttpModifyApproverVO modifyApproverVO);

}